<template>
  <div>
    <s-nav-bar :title="title"></s-nav-bar>
    <top-head :title="sign"></top-head>
    <book-list :data="datalist" :showsign="true"></book-list>
  </div>
</template>

<script>
import sNavBar from '@/components/sNavBar.vue'
import BookList from '@/components/BookList.vue'
import TopHead from '@/components/TopHead.vue'
export default {
  name: 'topRankView',
  components: {
    sNavBar,
    TopHead,
    BookList
  },
  data() {
    return {
      datalist: [],
      title: '',
      sign: ''
    }
  },
  activated() {
    if (this.$route.params.data) {
      this.getData();
    }
  },
  methods: {
    getData() {
      this.datalist = Object.freeze(this.$route.params.data || []);
      this.title = this.$route.params.title;
      this.sign = this.$route.params.sign;
    }
  }
}
</script>

<style></style>